package io;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileCopyDemo01 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("img.png");
        FileOutputStream fos = new FileOutputStream("image.png");

        int n = 0;
        while ((n=fis.read())!=-1){
            fos.write(n);
        }
        fis.close();
        fos.close();

    }
}
